<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>user</title>
<link rel="stylesheet" type="text/css" href="styles/common.css">
</head>
<body>
	<div id="" class="nav">
		<a class="navactive" href="#">借阅信息</a>
		<a href="usersearchbook">检索图书</a>
		<p>用户名：<?php echo e($UserInfo['username']); ?> 学号：<?php echo e($UserInfo['userid']); ?></p>
	</div>
	<h2>欢迎 <?php echo e($UserInfo['realname']); ?> 同学！</h2>
	<table class="tab" id="">
		<tbody>
  			<tr>
    	 		<th>书的id</th>
     	 		<th>书的名字</th>
     	 		<th>作者</th>
     	 		<th>书的出版社</th>
      			<th>借书日期</th>
     	 		<th>还书日期</th>
      			<th>操作</th>
    		</tr>
			<?php foreach($borrowInfo as $value): ?>
			<tr>
    			<td><?php echo e($value['bookid']); ?></td>
		     	<td>《<?php echo e($bookInfo[$value['bookid']]['bookname']); ?>》</td>
			    <td><?php echo e($bookInfo[$value['bookid']]['author']); ?></td>
			    <td><?php echo e($bookInfo[$value['bookid']]['press']); ?></td>
			    <td><?php echo e(date('Y-m-d',$value['borrowdate'])); ?></td>
			    <td><?php echo e(date('Y-m-d',$value['rentdate'])); ?></td>
      			<td>
					<?php if($value['last'] == 1): ?>
						<a href="#" class="last" value="<?php echo e($value['borrowid']); ?>">续借</a>
					<?php endif; ?>
					<?php if($value['rentdate']>=time()): ?>
						<a href="#" class="rent" value="<?php echo e($value['borrowid']); ?>" about="<?php echo e($value['bookid']); ?>">
							归还
						</a>
					<?php endif; ?>
				</td>
   			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>


</body>
<script src="script/jquery-3.1.1.min.js"></script>
<script src="script/user.js"></script>
</html>